
%!TEX program = xelatex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt]{article} 

\input{wang_preamble.tex}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{center}
{\Large\bf \H 上海立信会计金融学院期终考试卷 } \hspace{0.3cm} {\Large \underline{ A }卷 解答}

\vspace{0.3cm}

{\large \bf \H 2020 $\sim$ 2021 学年 第 二 学期 }

\vspace{0.3cm}

{\large \bf \H \underline{ \emph{2019级数学与应用数学专业} } 《\underline{ \emph{应用随机过程} }》 课程代码：\underline{ 161190223}  }

\end{center}

\vspace{0.3cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目1：
{\bf  Markov chains - concepts} - 10 Points 

%\item [E3.2.2.] 
A particle moves among the states $0, 1, 2$ according to a Markov process whose transition probability matrix is $P$. Let $X_n$ denote the position of the particle at the $n$th move. Calculate $\mathbb{P}\{X_3 =2\mid X_1 = 0\}$.

$%\begin{eqnarray*}
P=
\begin{blockarray}{cccc}
& 0 & 1 & 2 \\
\begin{block}{c[ccc]}
  0 & 0.1 & 0.2 & 0.7 \\
  1 & 0.2  &0.3  & 0.5 \\ 
  2 & 0.3 & 0.1  & 0.6 \\
\end{block}
\end{blockarray}.
$%\end{eqnarray*}


{
\vspace{0.2cm}
\color{red}Solution. There are three routes from state 0 to state 2 in two moves, that is to say, 002, 012 and 022. The only uncertainty is in the state $X_2$ of the chain at the second move. 
%By CK equation, $P^{(2)}=P^2$. 
\begin{eqnarray*}
\mathbb{P}\{X_3 =2\mid X_1 = 0\} &=& \sum\limits_{k=0}^{2} \mathbb{P}\{X_2 =k\mid X_1 = 0\} \mathbb{P}\{X_3 =2\mid X_2 = k\}  \\
&=& P_{00}P_{02}+P_{01}P_{12}+P_{02}P_{22} \\
&=& (0.1)(0.7)+(0.2)(0.5)+(0.7)(0.6) \\
&=& 0.59.  
\end{eqnarray*}


}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目2：

{\bf  Markov chains - first step analysis} - 15 Points 

%\item [E3.4.2.] 
Consider the Markov chain whose transition probability matrix is given by $P$. 
Starting in state 0, determine the probability that the Markov chain ends in state 3.

\begin{multicols}{2}

$%\begin{eqnarray*}
P=
\begin{blockarray}{ccccc}
& 0 & 1 & 2 & 3\\
\begin{block}{c[cccc]}
  0 & 0.4 & 0.3 & 0.2 & 0.1 \\
  1 & 0.3 & 0.2 & 0.3 & 0.2\\ 
  2 & 0    & 0   &  1    & 0  \\
  3 & 0    & 0   &  0    & 1  \\
\end{block}
\end{blockarray}.
$%\end{eqnarray*}

\tikz{
\node [circle, draw] (a0) at (0,2) {0}; 
\node [circle, draw] (a1) at (2,0) {1}; 
\node [circle, draw] (a2) at (2,2) {2}; 
\node [circle, draw] (a3) at (0,0) {3}; 

\graph {(a0) ->  (a1) };
\graph {(a0) ->  (a2) };
\graph {(a0) ->  (a3) };
\graph {(a1) ->  (a2) };
\graph {(a1) ->  (a3) };
}

\end{multicols}

{
\vspace{0.2cm}
\color{red}Solution. 
Let $u_{i2}$ and $u_{i3}$ be the probability that this Markov chain ends in state 2 and 3 respectively, starting from state $i$, where $i=0,1$. By first step analysis, we have the following system of equations, 
\begin{eqnarray*}
\left\{\begin{array}{rcl}
u_{02} &=& p_{00}u_{02}+p_{01}u_{12}+p_{02}\cdot 1+p_{03}\cdot 0, \\
u_{03} &=& p_{00}u_{03}+p_{01}u_{13}+p_{02}\cdot 0+p_{03}\cdot 1, \\
u_{12} &=& p_{10}u_{02}+p_{11}u_{12}+p_{12}\cdot 1+p_{13}\cdot 0, \\
u_{13} &=& p_{10}u_{03}+p_{11}u_{13}+p_{12}\cdot 0+p_{13}\cdot 1,
\end{array}\right.
\end{eqnarray*}
From this we get $u_{02}=25/39$ and $u_{03}=14/39$. Note that we also get $u_{12}=8/13$ and $u_{13}=5/13$. 

}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目3：

{\bf  Markov chains - long run behavior } - 15 Points 

%\item [E4.4.2.] 
Consider the Markov chain whose transition probability matrix is given by $P$ below. 
\begin{enumerate}
\item  Determine the limiting probability $\pi_0$ that the process is in state 0.
\item  Calculate the mean time $m_{10}$ for the process to go from state 1 to state 0.
\end{enumerate}

$%\begin{eqnarray*}
P=
\begin{blockarray}{ccc}
 & 0 & 1 \\
\begin{block}{c[cc]}
  0   & 0.3 & 0.7 \\ 
  1   & 0.6 & 0.4 \\ 
\end{block}
\end{blockarray}.
$%\end{eqnarray*}


{
\vspace{0.2cm}
\color{red}Solution. 
\begin{enumerate}
\item  Let $\pi=(\pi_0,\pi_1)$ be the limiting distribution of the Markov chain. Since the matrix is regular, the limiting distribution is the stable distribution. Thus $\pi P=\pi$, that is, 
\begin{eqnarray*}
\begin{pmatrix}\pi_0 & \pi_1 \end{pmatrix} = 
\begin{pmatrix}\pi_0 & \pi_1 \end{pmatrix}
\begin{pmatrix}0.3&0.7 \\ 0.6&0.4 \end{pmatrix}.
\end{eqnarray*}
Since $\pi_0+\pi_1=1$, we get $\pi_0=6/13$ and $\pi_1=7/13$. 

\item Consider the first step it takes from state 1. It either stays at state 1 or jumps to state 0. Thus the mean time $m_{10}$ satisfies the equation 
\begin{eqnarray*}
m_{10} = p_{11}\cdot (1+m_{10})+p_{10}\cdot 1.
\end{eqnarray*}
From this we get $m_{10}=5/3$. We see that in average it takes more than 1 step but less than 2 steps to jump from state 1 to state 0. 
%Question: How do you simulate a process like this one?

\end{enumerate}

}

\vspace{0.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目4：

{\bf  Poisson processes - concepts } - 15 Points

%\item [E5.1.7.] 
Suppose that customers arrive at a facility according to a Poisson process having rate $\lambda$. 
Let $X(t)$ be the number of customers that have arrived up to time $t$. 
Determine the following probabilities and conditional probabilities. 
\begin{enumerate}
\item  $\mathbb{P}\{X(1)=3\}$.
\item  $\mathbb{P}\{X(4)=10 \mid X(1)=3\}$.
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. Recall the definition of Poisson processes. 
\begin{enumerate}
\item  Since $X(1)\sim \text{pois}(\lambda)$, we get $$\mathbb{P}\{X(1)=3\}=\frac{\lambda^3}{3!}e^{-\lambda}.$$
\item  Since the increments $X(4)-X(1)$ and $X(1)$ are independent, and the distribution of $X(4)-X(1)$ is $\text{pois}(3\lambda)$, we get 
$$\mathbb{P}\{X(4)=10 \mid X(1)=3\} = \mathbb{P}\{X(4)-X(1)=7\} = \frac{(3\lambda)^7}{7!}e^{-3\lambda}.$$
\end{enumerate}


}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目5：

{\bf  Poisson processes - associated distributions } - 15 Points

%\item [E5.3.3.] 
Customers enter a supermarket according to a Poisson process of rate $\lambda = 100$ per hour. 
Suppose it is known that exactly 120 customer entered during the first hour. 
\begin{enumerate}
\item  What is the conditional probability that exactly 30 customers entered during the first 20 min?
\item  What is the conditional expectation of the number of customers who entered during the first 20 min?
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. Conditioned on a fixed total number of events in an interval, the locations of these events, without considering their order of appearances, are uniformly distributed in this interval. 
\begin{enumerate}
\item  The arrival time of each of these customers is uniformly distributed in the first hour. Thus each customer entered during the first 20 minutes with probability 1/3. Thus the conditional probability we are looking for is a binomial distribution 
$$\binom{120}{30}\left(\frac{1}{3}\right)^{30}\left(\frac{2}{3}\right)^{90}.$$

\item  Let $Y = [X(1/3)\mid X(1)=120]$ be the random variable under the given condition. Then $Y\sim b(n,p)$ where $n=120$ and $p=1/3$. Thus $\mathbb{E}(Y)=np=40$. 

\end{enumerate}

}

\vspace{0.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目6：

{\bf  Markov chains - continuous time} - 15 Points

%\item [E6.1.2.] 
A pure birth process starting from $X(0) = 0$ has birth parameters $\lambda_0 = 2$, $\lambda_1 =5$ and $\lambda_2 =10$. 
\begin{enumerate}
\item  Denote the probability functions $P_n(t)=\mathbb{P}\{X(t)=n\}$. Determine $P_0(t)$ and $P_1(t)$. 
\item  Find the mean time $\mathbb{E}(W_2)$ it takes the process to reach state 2 from state 0. 

Hint. You may need the differential equations \\
$%\begin{eqnarray*}
\left\{\begin{array}{rcl}
P_0'(t) &=& -\lambda_0 P_0(t), \\
P_1'(t) &=& -\lambda_1 P_1(t) + \lambda_0P_0(t).
\end{array}\right.
$%\end{eqnarray*}

\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. 
\begin{enumerate}
\item  The solution to the equation $P_0'(t)=-\lambda_0P_0(t)$ with initial condition $P_0(0)=1$ is $$P_0(t)=e^{-\lambda_0 t}=e^{-2t}.$$ 
The solution to the equation $P_1'(t) = -\lambda_1 P_1(t) + 2e^{-2t}$ with initial condition $P_1(0)=0$ is 
$$P_1(t)=\frac{2}{3}e^{-2t} - \frac{2}{3}e^{-5t}.$$ 

\item  Let $S_0$ and $S_1$ be the sojourn times in states 0 and 1. Then these are exponentially distributed random variables with means $1/\lambda_0$ and $1/\lambda_1$. Thus we get $$\mathbb{E}(W_2)=\mathbb{E}(S_0)+\mathbb{E}(S_1)=\frac{1}{2}+\frac{1}{5}=\frac{7}{10}.$$

\end{enumerate}
}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目7：

{\bf  Brownian motions } - 15 Points

%\item [E8.2.1.] 
Let $\{B(t); t \ge 0\}$ be the standard Brownian motion, with $B(0) = 0$, and let 
$$M(t) = \max\{B(u); 0 \le u \le t\}.$$
\begin{enumerate}
\item  Find the probability $\mathbb{P}\{B(3) \le 2\}$. 
\item  Find the probability $\mathbb{P}\{M(3) \le 2\}$. 
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. Recall the definition of the standard Brownian motion.
\begin{enumerate}
\item  Since $B(3)\sim N(0,3)$ is a normal distribution, we get $$\mathbb{P}\{B(3) \le 2\} =\mathbb{P}\left\{\frac{B(3)}{\sqrt{3}} \le \frac{2}{\sqrt{3}}\right\} = \Phi\left(\frac{2}{\sqrt{3}}\right).$$ 

\item  By the reflection principle, $\mathbb{P}\{M(3) > 2\} = 2\mathbb{P}\{B(3)>2\} = 2- 2\Phi\left(\frac{2}{\sqrt{3}}\right)$. Thus we get 
$$\mathbb{P}\{M(3) \le 2\} = 2\Phi\left(\frac{2}{\sqrt{3}}\right) - 1.$$

\end{enumerate}

}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{enumerate}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{document}





